<html>
  <body>
    <form runat="server">
      <input type="text" id="op1" runat="server" />
      +
      <input type="text" id="op2" runat="server" />
      <input type="submit" value="  =  " OnServerClick="OnAdd"
        runat="server" />
      <span id="Sum" runat="server" />
    </form>
  </body>
</html>

<script language="C#" runat="server">
  void OnAdd (Object sender, EventArgs e)
  {
      int a = Convert.ToInt32 (op1.Value);
      int b = Convert.ToInt32 (op2.Value);
      Sum.InnerText = (a + b).ToString ();
  }
</script>